/*********************************************************************************
Organization 					: 				Georgia Institute of Technology
  
Institute 						:				Cognitive Computing Group(CCL)
 
Authors							: 				Manish Mehta 
 												
Class							:				Testtrace
 
Function						: 				A simple class for testing the trace
****************************************************************************/

package trace;


import serialization.BinarySerialization;
import cbr.CBR;

public class Testtrace {
	public Trace tr;
	public Testtrace()
	{
	}
	public void readSerialize(String filename)
	{
		tr = (Trace)BinarySerialization.load(filename);
	}
	public static void main(String[] args)
	{
		Testtrace t = new Testtrace();
		t.readSerialize("game-trace-lite-4-inf-cases.dat");
	//	t.readSerialize("game-trace-lite-4.dat");		
		Trace trace = t.tr;	
		CBR cbr = new CBR();
		for(int i = 0; i < trace.size(); i++)
		{
				Entry e = (Entry)trace.get(i);
	/*			System.out.println("Trace Entry is:");
				System.out.println("Game State is:" + CBLILRModule.GenerateXML(e.getGameState()));
				System.out.println("Behavior Status is:" + e.getEventType());
				System.out.println("Behavior Delay is:" + e.getDelay());
				System.out.println("Behavior Time is:" + e.getTime());
				System.out.println("Plan is:" + e.getPlan().toString());
				
				System.out.println("Plan is:" + e.getPlan().getClass().getName());
			*/
		}
	/*	for(int i = 0; i < t.tr.gamestates.size(); i++)
		{
			System.out.println("Trace Entry is:");
			GameStateEntry gentry = ((GameStateEntry)t.tr.gamestates.get(i));
			Node no = gentry.getGameState().getFirstChild();
			System.out.println("Game State is:" + CBLILRModule.GenerateXML(no));
			double value = gentry.getCycle().doubleValue();
			System.out.println("Cycle is" + value);
		}*/
		//t.tr.printTrace1();
		System.out.println("I m done");
	}
}
